<!DOCTYPE html>
<html>
<head>
<title>InputEvent: Event Listener test</title>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
</head>
<body>
<div id="log"></div>
<input type="text" id="txt">

<script>
async_test(function() {
    var txt = document.getElementById('txt');
    txt.addEventListener('input', this.step_func_done(function(e) {
        assert_true(e instanceof InputEvent);
        assert_equals(e.type, 'input');
        assert_equals(e.bubbles, true);
    }));
    if (!window.eventSender) {
        document.write('This test requires eventSender');
    } else {
        txt.focus();
        eventSender.keyDown('a');
    }
}, "Testing input event listener");
</script>

</body>
</html>
